package service.impl;

import dao.FlightMapper;
import org.springframework.stereotype.Service;
import pojo.Flight;
import service.FlightService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class FlightServiceImpl implements FlightService {
    @Resource
    private FlightMapper flightMapper;
    public List<Flight> getFlightList() {
        //Ctrl+Alt+T
        //Alt+insert:setter
        try {
            return flightMapper.findAll();
        } catch (RuntimeException e) {
            e.printStackTrace();
            throw e;
        }
    }
}
